/*
 * @Author: 谢陈洁
 * @Date: 2025-06-18 13:00:16
 * @LastEditors: 谢陈洁
 * @LastEditTime: 2025-07-14 15:28:09
 * @Description: file content
 */
import { get, post } from "@/services/request/http"

export const saveDictItem = (data: Record<string, any>): Promise<any> => { // 保存字典项
  return post('/dictionary/save', data)
}
export const getDictionary = (data: Record<string, string>): Promise<any> => { // 获取字典分类
  return get('/dictionary/list', data)
}
// 获取字典项
export const getDictionaryItemList = (data: Record<string, string>): Promise<any> => { // 获取字典项
  return get('/dictionary/item/list', data)
}

export const deleteDictItem = (data: Record<string, any>): Promise<any> => { // 删除字典项
  return post('/dictionary/delete', data)
}

  // 获取字典分类列表 带有项
export const getAllDictionary = (data: Record<string, string>): Promise<any> => {
  return get('/dictionary/listAll', data)
}

export const saveDict = (data: Record<string, any>): Promise<any> => { // 保存字典分类
  return post('/dictionary/saveCategory', data)
}

export const deleteDict = (id: string | number): Promise<any> => { // 删除字典分类
  return post('/dictionary/deleteCategory', { id })
}
